package org.suyafei.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.suyafei.controller.request.UseTrafficRequest;
import org.suyafei.utils.JsonData;

/**
 * @author 宿某人
 * @Date: 2022/03/23/10:57
 * @Description:
 */
@FeignClient(name = "scloud-account-server")
public interface TrafficFeignService {

    /**
     * 使用流量包
     * @param request
     * @return
     */
    @PostMapping(value = "api/traffic/v1/reduce",headers = {"rpc-token=${rpc.token}"} )
    JsonData useTraffic(@RequestBody UseTrafficRequest request);
}
